package com.mogist.hqc.module.common.presenter

import com.mogist.hqc.entitys.BaseResponse
import com.mogist.hqc.module.common.contract.SettingContract
import com.mogist.hqc.mvp.HttpDto
import com.mogist.hqc.mvp._PresenterImpl
import com.mogist.hqc.util.Constant

/**
 * 作用：设置
 * 作者：赵小白 email:vvtale@gmail.com  
 * 修改人：
 * 修改时间：
 * 修改备注：
 */
class SettingPresenter(view: SettingContract.View) : _PresenterImpl<SettingContract.View, BaseResponse>(
        view), SettingContract.Presenter
{
    override fun requestSuccess(response: BaseResponse, http: HttpDto)
    {
        when (http.url)
        {
            Constant.LOGIN_OUT->
            {
                mView.logout()
            }
        }
    }

    override fun requestError(msg: String?, httpDto: HttpDto?)
    {
        mView.logout()
    }
}